{% extends "base.html" %}
{% comment 'header' %}
# This file is part of opentaps Smart Energy Applications Suite (SEAS).

# opentaps Smart Energy Applications Suite (SEAS) is free software:
# you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# opentaps Smart Energy Applications Suite (SEAS) is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

# You should have received a copy of the GNU Lesser General Public License
# along with opentaps Smart Energy Applications Suite (SEAS).
# If not, see <https://www.gnu.org/licenses/>. {% endcomment %} {% load crispy_forms_tags %} {% block content %} <div
  class="content-section">
  {% if exists == "existing" %}
  <h2>Enroll User</h2>
  {% else %}
  <h2>Enroll User</h2>
  <p class="alert alert-success">Successfully registered new organization {{name}}.</p>
  {% endif %}
  <ul class="pt-3">
    {% for user in all_users %}
    {% if user.org_name != name%}

    <li>
      <a href="{% url 'core:hyperledger_enroll' user=user org_name=name%}">
        <input type="submit" value={{user}} name="mybtn" id="start_submit" class="d-block"
          style="border: none; background-color: white; color: blue;" />
      </a>
    </li>
    {% endif %}
    {% endfor %}
  </ul>
  <p class="pt-5 font-weight-bold">Users currently enrolled in {{name}}</p>
  <ul>
    {% for user in all_users %}
    {% if user.org_name == name %}
    <li>
      <p class="d-block ml-1">{{user}}</p>
    </li>
    {% endif %}
    {% endfor %}
  </ul>
  <br><a href="{% url 'core:hyperledger_query_admin' %}">
    <button class="btn btn-primary mt-5" type="submit">Back</button>
  </a>
  </div>
  {% endblock %}
